<!DOCTYPE html>
<html ng-app="notesApp">
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body ng-controller="MainCtrl as ctrl">
		{{ctrl.helloMsg}} AngularJS
		<br />
		{{ctrl.goodbyeMsg}} AngularJS
		<br />
		{{ctrl.message}} AngularJS
		<button ng-click="ctrl.changeMessage()">change Message</button>
	</body>
	<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		angular.module('notesApp', [])
		.controller('MainCtrl', [function(){
			this.helloMsg = 'Hello';
			var goodbyeMsg = 'Goodbye';
			
			var self = this;
			self.message = 'Hello';
			self.changeMessage = function(){
				self.message = 'Goodbye';
			}
		}]);
	</script>
</html>
